home *** CD-ROM | disk | FTP | other *** search
/ Amiga Tools 3 / Amiga Tools 3.iso / rexx / sparkle.rexx < prev    next >
OS/2 REXX Batch file  |  1995-10-01  |  1KB  |  62 lines

  1. /* Image Engineer ARexx macro script */
  2. /* by Simon Edwards                  */
  3. /* 12/6/95                           */
  4.  
  5. Options results
  6. signal on error            /* Setup a place for errors to go */
  7.  
  8. if arg()==0 then exit
  9.  
  10. HIGHPASS arg(1) 3 3 SCALE
  11. highfreq=RESULT
  12.  
  13.  
  14. 'HISTOGRAM_EQUALIZATION' highfreq
  15. histoproject=RESULT
  16.  
  17. 'CLOSE' highfreq
  18.  
  19. 'GET_NUMBER "Theshold value to use" 1 255 "Ok|Cancel" 252'
  20. thresholdvalue=RESULT
  21.  
  22. THRESHOLD histoproject thresholdvalue
  23. thresproject=RESULT
  24.  
  25. CLOSE histoproject
  26.  
  27. 'CONVOLVE' thresproject '"IE:Convolves/Spark"'
  28. sparkproject=RESULT
  29.  
  30. CLOSE thresproject
  31.  
  32. THRESHOLD sparkproject 1
  33. primaryproject=RESULT
  34.  
  35. MARK primaryproject PRIMARY
  36. MARK arg(1) SECONDARY
  37. MARK sparkproject ALPHA
  38. COMPOSITE 0 0 ALPHA
  39.  
  40. CLOSE sparkproject
  41. CLOSE primaryproject
  42.  
  43. exit
  44.  
  45. /*******************************************************************/
  46. /* This is where control goes when an error code is returned by IE */
  47. /* It puts up a message saying what happened and on which line     */
  48. /*******************************************************************/
  49. error:
  50. if RC=5 then do            /* Did the user just cancel us? */
  51.     IE_TO_FRONT
  52.     LAST_ERROR
  53.     'REQUEST "'||RESULT||'"'
  54.     exit
  55. end
  56. else do
  57.     IE_TO_FRONT
  58.     LAST_ERROR
  59.     'REQUEST "Error detected!!!'||D2C(10)||'Image Engineer error message is as follows'||D2C(10)||result||D2C(10)||'Script failed on line '||SIGL||'"' 'Doh!'
  60.     exit
  61. end
  62.